using System.IO;

namespace Kassandra.Core
{
    public class Translate : ITranslate
    {
        public void For(string sourceFile, string destinationFile)
        {
            using (StreamReader sr = new StreamReader(sourceFile))
            {
                IWordMlDocument docTranslator = new WordMlDocument(sr.ReadToEnd());
                using (StreamWriter sw = new StreamWriter(destinationFile))
                {
                    sw.Write(docTranslator.ConvertDocument());
                    sw.Flush();
                }
            }
        }
    }
}